//
//  STNetworkTools.h
//  OCVVeibo
//
//  Created by leergou on 16/7/22.
//  Copyright © 2016年 WhiteHouse. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworking.h>
@class STUserAccountDTO;
// 请求类型的枚举
typedef NS_ENUM(NSInteger, RequestType){
    GET,
    POST
};

@interface STNetworkTools :AFHTTPSessionManager


+ (instancetype)sharedTools;

- (void)request:(RequestType)type urlString:(NSString *)urlString parameters:parameters success:(void(^)(id response))success failure:(void(^)(NSError *error))failure;

// 获取用户账号
- (void)oahtLoadUserAccountWithCode:(NSString *)code success:(void(^)(id response))success failure:(void(^)(NSError *error))failure;


// 获取用户信息
- (void)oahtLoadUserInfoWithUserAccount:(STUserAccountDTO *)userAccountDTO success:(void(^)(id response))success failure:(void(^)(NSError *error))failure;

// 获取首页数据
- (void)homeLoadDataWithSuccess:(void(^)(id response))success failuer:(void(^)(NSError *error))failure;



@end
